const getters = {
  // 快捷访问
  // 如果没有这个快捷访问，例如组件中要想访问 sidebar，this.$store.state.app.sidebar
  // this.$store.getters.sidebar
  sidebar: state => state.app.sidebar,
  device: state => state.app.device,
  token: state => state.user.token,
  name: state => state.user.userInfo.username,
  userId: state => state.user.userInfo.userId,
  staffPhoto: state => state.user.userInfo.staffPhoto,
  companyId: state => state.user.userInfo.companyId,
  routes: state => state.permissions.routes,
  roles: state => state.user.userInfo.roles
}
export default getters
